<template>
   <!-- footer -->
        <footer>
            <ul>
                <li @click="toIndex">
                    <i class="fa fa-home"></i>
                    <p>云医院</p>
                </li>
                <li @click="toStore">
                    <i class="fa fa-opencart"></i>
                    <p>商城</p>
                </li>
                <li>
                    <i class="fa fa-compass"></i>
                    <p>发现</p>
                </li>
                <li @click="toPersonal">
                    <i class="fa fa-user"></i>
                    <p>我</p>
                </li>
            </ul>
        </footer>
</template>

<script>
import { reactive, toRefs } from 'vue';
import axios from 'axios';
import { useRouter, useRoute } from 'vue-router';
export default {
        setup() {
            const router = useRouter();
            const route = useRoute();

            //跳转个人中心
            function toPersonal() {
                router.push('/personalView');
            }

            //跳转首页
            function toIndex() {
                router.push('/index');
            }

            //跳转商城页面
            function toStore() {
                router.push('/store');
            }

            return {
                toPersonal,
                toIndex,
                toStore
            }
        }
}
</script>

<style scoped>
/*********************** footer ***********************/
footer{
    width: 100%;
    height: 14.2vw;
    box-sizing: border-box;
    border-top: solid 1px #E9E9E9;
    background-color: #FFF;

    position: fixed;
    left: 0;
    bottom: 0;
}
footer ul{
    width: 100%;
    height: 14.2vw;
    display: flex;
    align-items: center;
    justify-content: space-around;
}
footer ul li{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    font-size: 3vw;
    color: #999;

    user-select: none;
    cursor: pointer;
}
footer ul li .fa{
    font-size: 5vw;
}
</style>